<?php
include_once("includes/config.inc.php");
?>

<html>
 <head>
   <title><?php $conf_bookname; ?></title>
 </head>
  <body>
    <center><font size="6"><?php echo $conf_bookname; ?></font><br><br>
    <table border="1" width="90%" style="border-color:#000000; border-width:2px; border-style:solid; border-collapse:collapse">
<tr>
 <td width=2%><img src="images/mail.png"></a></td>
 <td><b>Name</b></td>
 <td><b>Eintrag</b></td>
</tr><?php
    mysql_connect($conf_host, $conf_user, $conf_pw);
    mysql_select_db($conf_dbname);
    $sql = "SELECT * FROM ". $conf_praefix . "posts ORDER BY date DESC";
    $posts = mysql_query($sql);
    $returnarray = array();
    while($row = mysql_fetch_object($posts)) {
    $rowname = $row->name;
    $rowmail = $row->mail;
    $rowposts = $row->post;
    echo "
     <tr>
      <td>";
if(!empty($rowmail)) {
      echo "<a href=\"mailto:" . $rowmail . "\"><img src=\"images/mail.png\" border=\"0\"></a></td>";
}
else {
      echo "<img src=\"images/no_mail.png\"></a></td>";
}
  echo "<td>" . 
       $rowname .
      "</td>
       <td>" .
       $rowposts .
       "</td>
       </tr>";
    }
?>
    </table>
